//
//  HomeTableViewCell.m
//  grainHouse
//
//  Created by 北风 on 14-10-16.
//  Copyright (c) 2014年 北风. All rights reserved.
//

#import "HomeTableViewCell.h"

@implementation HomeTableViewCell
- (void)dealloc
{
    [_Xin release];
    [_PictureView release];
    [_piceLabel release];
    [_jieLabel release];
    [super dealloc];
}
- (void)awakeFromNib {
    // Initialization code
}

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.imageBig = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 300, 170)];
        self.imageBig.userInteractionEnabled = YES;
        [self.imageBig setBackgroundColor:[UIColor cyanColor]];
        [self.imageBig setImage:[UIImage imageNamed:@"u=584523504,275370103&fm=23&gp=0.jpg"]];
        [self.contentView addSubview:self.imageBig];
        
        
        self.PictureView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 130, 150)];
        self.PictureView.userInteractionEnabled = YES;
        self.PictureView.layer.borderColor = [UIColor whiteColor].CGColor;
        self.PictureView.layer.borderWidth = 5;
        [self.PictureView setBackgroundColor:[UIColor blueColor]];
        [self.imageBig addSubview:_PictureView];
        
        
        
        self.imageLabel = [[UIImageView alloc] initWithFrame:CGRectMake(_PictureView.frame.origin.x + _PictureView.frame.size.width + 15, _PictureView.frame.origin.y, 135, 150)];
        self.imageLabel.userInteractionEnabled = YES;
        self.imageLabel.layer.borderColor = [UIColor whiteColor].CGColor;
        self.imageLabel.layer.borderWidth = 5;
        
        [self.imageLabel setImage:[UIImage imageNamed:@"2904c35ddd72f783bd0f9728d40eb59c.jpg"]];
        
        [self.imageBig addSubview:self.imageLabel];
        
        self.jieLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 120, 110)];
        self.jieLabel.numberOfLines = 0;
        self.jieLabel.userInteractionEnabled = YES;
        self.jieLabel.textColor = [self tBackgroundColor];
        self.jieLabel.adjustsFontSizeToFitWidth =YES;
        self.jieLabel.tag =0;
        self.jieLabel.shadowOffset =CGSizeMake(3,3);
        [self.imageLabel addSubview:_jieLabel];
        
        
        
        self.piceImage = [[UIImageView alloc] initWithFrame:CGRectMake(_imageLabel.frame.origin.x + 5 , _imageLabel.frame.origin.y + _imageLabel.frame.size.height - 25 , 125, 20)];
        self.piceImage.userInteractionEnabled = YES;
        [self.piceImage setBackgroundColor:[self tBackgroundColor]];
        [self.imageBig addSubview:self.piceImage];
        
        
        
        self.piceLabel = [[UILabel alloc] initWithFrame:CGRectMake(3, 0, 125, 20)];
        self.piceLabel.font = [UIFont systemFontOfSize:13];
        
        //[self.piceLabel setBackgroundColor:[UIColor orangeColor]];
        [self.piceImage addSubview:_piceLabel];
        
        
        self.Xin = [XinButton buttonWithType:UIButtonTypeCustom];
        [self.Xin setFrame:CGRectMake(85, 0, 30, 30)];
        [self.piceImage addSubview:self.Xin];
        
        
        
        
    }
    return self;
}



#pragma mark - 自定义图片背景色
-(UIColor *)tBackgroundColor{
    
    UIColor *color = [UIColor colorWithRed:0.4 green:0.3 blue:0.3 alpha:0.3];
    return color;
}

#pragma mark- 自定义透明色
-(UIColor *)TextColor{
    
    
    UIColor *color = [UIColor colorWithWhite:255 alpha:0.9];
    return color;
    
}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    
    
    

}

@end
